# -*-mode: Makefile;-*- Time-stamp: <2005-10-16 18:07:08 ñç>
CXX = g++

CFLAG = -O3 -march=pentium4 -I.
LDFLAG =

.PHONY : all clean

libtinylog_a_SOURCES = tinylog.cpp tinylogfile.cpp

LIBS = libtinylog.a 

all : $(LIBS) testlog

clean :
	-@rm -f *.o *.a

%.o: %.cpp
	$(CXX) $(CFLAG) -c -o $@ $^
%.o: %.c
	$(CC) $(CFLAG) -c -o $@ $^

libtinylog.a : $(libtinylog_a_SOURCES:.cpp=.o)
	ar -rc $@ $^
	ranlib $@

testlog : testlog.o libtinylog.a
	$(CXX) $(LDFLAG) -o $@ $^
